package com.ruoyi.driver.service.impl;


import com.ruoyi.driver.domain.CarownerUsecar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.driver.mapper.CarownerUsecarMapper;

import com.ruoyi.driver.service.ICarownerUsecarService;

import java.util.List;

/**
 * 用车类型Service业务层处理
 * 
 * @author Wevon
 * @date 2024-08-13
 */
@Service
public class CarownerUsecarServiceImpl implements ICarownerUsecarService 
{
    @Autowired
    private CarownerUsecarMapper carownerUsecarMapper;

    /**
     * 查询用车类型
     * 
     * @param id 用车类型主键
     * @return 用车类型
     */
    @Override
    public CarownerUsecar selectCarownerUsecarById(Long id)
    {
        return carownerUsecarMapper.selectCarownerUsecarById(id);
    }

    /**
     * 查询用车类型列表
     * 
     * @param carownerUsecar 用车类型
     * @return 用车类型
     */
    @Override
    public List<CarownerUsecar> selectCarownerUsecarList(CarownerUsecar carownerUsecar)
    {
        return carownerUsecarMapper.selectCarownerUsecarList(carownerUsecar);
    }

    /**
     * 新增用车类型
     * 
     * @param carownerUsecar 用车类型
     * @return 结果
     */
    @Override
    public int insertCarownerUsecar(CarownerUsecar carownerUsecar)
    {
        return carownerUsecarMapper.insertCarownerUsecar(carownerUsecar);
    }

    /**
     * 修改用车类型
     * 
     * @param carownerUsecar 用车类型
     * @return 结果
     */
    @Override
    public int updateCarownerUsecar(CarownerUsecar carownerUsecar)
    {
        return carownerUsecarMapper.updateCarownerUsecar(carownerUsecar);
    }

    /**
     * 批量删除用车类型
     * 
     * @param ids 需要删除的用车类型主键
     * @return 结果
     */
    @Override
    public int deleteCarownerUsecarByIds(Long[] ids)
    {
        return carownerUsecarMapper.deleteCarownerUsecarByIds(ids);
    }

    /**
     * 删除用车类型信息
     * 
     * @param id 用车类型主键
     * @return 结果
     */
    @Override
    public int deleteCarownerUsecarById(Long id)
    {
        return carownerUsecarMapper.deleteCarownerUsecarById(id);
    }
}
